Skip to content

Conversation

@HannesWell
Copy link
Member

@HannesWell HannesWell commented Mar 24, 2025

Build only the SWT binaries whose native sources are really changed and just rename the binaries for all other platforms that are not changed.

Avoiding a rebuild of effectively unchanged binaries has multiple advantages, if only a sub-set of all supported platforms is build:

  • reduced build times
  • reduced occupation of precious native build-nodes in Jenkins
  • increased stability of the build because if the native build-nodes for the skipped platforms are unavailable the build isn't blocked anymore.
  • less occupation of the git large-file storage as renaming a binary file has basically zero-cost, while a modified binary (even if just slightly) will add the entire file again.

In order to ensure that native libraries can be renamed without recompilation, we first require:

This PR uses the same strategy as already used in Equinox:
https://github.com/eclipse-equinox/equinox/blob/master/Jenkinsfile

A visible difference in Jenkins is that, if one triggers a build explicitly, there are now three checkboxes to enforce the rebuild of natives for each supported OS (just like in Equinox).

@HannesWell HannesWell marked this pull request as ready for review March 24, 2025 20:35
@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2025

Test Results

   545 files  + 6     545 suites  +6   31m 14s ⏱️ - 2m 45s
 4 367 tests +37   4 355 ✅ +35   12 💤 +3  0 ❌  - 1 
16 616 runs  +37  16 512 ✅ +35  104 💤 +3  0 ❌  - 1 

Results for commit 99243d2. ± Comparison against base commit 1989d41.

♻️ This comment has been updated with latest results.

Rust rename the SWT native binary files for unchanged platforms to the
new version and only build those whose native sources really changed.

Avoiding a rebuild of effectively unchanged binaries has multiple
advantages, if only a sub-set of all supported platforms is build:
- reduced build times
- reduced occupation of precious native agents in Jenkins
- increased stability of the build because if a native build-agent
for a skipped platforms is unavailable the build isn't blocked.
- reduced future growth of the git large-file storage occupation as
renaming a binary file has basically zero-cost, while a modified binary
(even if just slightly) will add the entire file again.
@HannesWell HannesWell force-pushed the selective-native-build branch from 20ce19c to 99243d2 Compare March 27, 2025 20:22
@HannesWell
Copy link
Member Author

All testing done was successful and the results are as expected. So this is ready for submission.

@eclipse-platform/eclipse-platform-committers please pay special attention to the build and not build (respectively just rename) of the native binaries in case you are changing the native sources of one or multiple platforms. Thanks in advance.

@HannesWell HannesWell merged commit 89291e3 into eclipse-platform:master Mar 27, 2025
15 checks passed
@HannesWell HannesWell deleted the selective-native-build branch March 27, 2025 20:37
@HeikoKlare
Copy link
Contributor

Thank you, Hannes! Great improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants